package base

import (
	"github.com/antigloss/go/logger"
)

func init(){
	logger.Init("./log", 10, 2, 2, false)
	ConsoleWrite("日志记录初始化成功")
}

func LoggerWrite(logtype, msg string,args ...interface{}){
	switch logtype {
	case "error":
		logger.Error(msg,args)
	case "trace":
		logger.Trace(msg,args)
	case "panic":
		logger.Panic(msg,args)
	default:
		logger.Info(msg,args)
	}
}